// JavaScript Document
var fromValue = "Dilshad Garden";
var toValue = "Rithala";	
function fromsetter()
{	
	$('#frommenu').click(
	function() {
	  fromValue = $(this).val(); // this.value
	  console.log("from value: ", fromValue);
	});
	/*$('#frommenu').change(function() { // change event will fire on every selection change
	  fromValue = $(this).val(); // this.value
	  console.log("from value: ", fromValue);
	  //localStorage['from'] = fromValue;
	});*/
}
function tosetter()
{
	$('#tomenu').click(
	function() {
	  toValue = $(this).val(); // this.value
	  console.log("to value: ", toValue);
	});
}
function timeteller()
{
	var time;
	if (fromValue == "Dilshad Garden") 
	{
		if (toValue == "Dilshad Garden") {time = "Wrong value entered!"}
		else if (toValue == "Rithala") {time = "23:00 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "23:00 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "23:00 Hrs"}
		else if (toValue == "Noida City Center") {time = "22:30 Hrs"}
		else if (toValue == "Dwarka") {time = "22:45 Hrs"}
		else if (toValue == "Huda City Center") {time = "22:45 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "22:39 Hrs"}
		else if (toValue == "Mundka") {time = "23:00 Hrs"}
		else if (toValue == "Inderlok") {time = "23:00 Hrs"}
		else if (toValue == "Central Secretariat") {time = "22:45 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:30 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "22:45 Hrs"}				
	}
	else if (fromValue == "Rithala") 
	{
		if (toValue == "Dilshad Garden") {time = "23:01 Hrs"}
		else if (toValue == "Rithala") {time = "Wrong value entered!"}
		else if (toValue == "Jahangirpuri") {time = "23:16 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "23:16 Hrs"}
		else if (toValue == "Noida City Center") {time = "22:22 Hrs"}
		else if (toValue == "Dwarka") {time = "22:34 Hrs"}
		else if (toValue == "Huda City Center") {time = "22:34 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "22:34 Hrs"}
		else if (toValue == "Mundka") {time = "23:01 Hrs"}
		else if (toValue == "Inderlok") {time = "23:46 Hrs"}
		else if (toValue == "Central Secretariat") {time = "22:34 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:10 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "22:34 Hrs"}				
	}
	else if (fromValue == "Jahangirpuri") 
	{
		if (toValue == "Dilshad Garden") {time = "23:00 Hrs"}
		else if (toValue == "Rithala") {time = "22:45 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "Wrong value entered!"}
		else if (toValue == "Vishwavidyalaya") {time = "23:55 Hrs"}
		else if (toValue == "Noida City Center") {time = "22:45 Hrs"}
		else if (toValue == "Dwarka") {time = "23:00 Hrs"}
		else if (toValue == "Huda City Center") {time = "23:00 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "23:00 Hrs"}
		else if (toValue == "Mundka") {time = "22:45 Hrs"}
		else if (toValue == "Inderlok") {time = "23:00 Hrs"}
		else if (toValue == "Central Secretariat") {time = "23:00 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:45 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "22:45 Hrs"}				
	}
	else if (fromValue == "Vishwavidyalaya") 
	{
		if (toValue == "Dilshad Garden") {time = "23:10 Hrs"}
		else if (toValue == "Rithala") {time = "22:55 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "00:08 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "Wrong value entered!"}
		else if (toValue == "Noida City Center") {time = "22:55 Hrs"}
		else if (toValue == "Dwarka") {time = "23:10 Hrs"}
		else if (toValue == "Huda City Center") {time = "23:10 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "23:10 Hrs"}
		else if (toValue == "Mundka") {time = "22:55 Hrs"}
		else if (toValue == "Inderlok") {time = "22:55 Hrs"}
		else if (toValue == "Central Secretariat") {time = "23:10 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:40 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "23:10 Hrs"}				
	}
	else if (fromValue == "Noida City Center") 
	{
		if (toValue == "Dilshad Garden") {time = "22:10 Hrs"}
		else if (toValue == "Rithala") {time = "22:10 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "23:05 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "23:05 Hrs"}
		else if (toValue == "Noida City Center") {time = "Wrong value entered!"}
		else if (toValue == "Dwarka") {time = "23:05 Hrs"}
		else if (toValue == "Huda City Center") {time = "23:05 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "23:05 Hrs"}
		else if (toValue == "Mundka") {time = "22:15 Hrs"}
		else if (toValue == "Inderlok") {time = "22:10 Hrs"}
		else if (toValue == "Central Secretariat") {time = "23:05 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:45 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "23:05 Hrs"}				
	}
	else if (fromValue == "Dwarka") 
	{
		if (toValue == "Dilshad Garden") {time = "22:19 Hrs"}
		else if (toValue == "Rithala") {time = "22:04 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "22:42 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "22:42 Hrs"}
		else if (toValue == "Noida City Center") {time = "22:42 Hrs"}
		else if (toValue == "Dwarka") {time = "Wrong value entered!"}
		else if (toValue == "Huda City Center") {time = "22:42 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "22:04 Hrs"}
		else if (toValue == "Mundka") {time = "22:04 Hrs"}
		else if (toValue == "Inderlok") {time = "22:04 Hrs"}
		else if (toValue == "Central Secretariat") {time = "22:42 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:34 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "00:19 Hrs"}				
	}		
	else if (fromValue == "Huda City Center") 
	{
		if (toValue == "Dilshad Garden") {time = "22:15 Hrs"}
		else if (toValue == "Rithala") {time = "22:02 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "23:00 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "23:30 Hrs"}
		else if (toValue == "Noida City Center") {time = "22:15 Hrs"}
		else if (toValue == "Dwarka") {time = "22:38 Hrs"}
		else if (toValue == "Huda City Center") {time = "Wrong value entered!"}
		else if (toValue == "Sarita Vihar") {time = "22:08 Hrs"}
		else if (toValue == "Mundka") {time = "22:02 Hrs"}
		else if (toValue == "Inderlok") {time = "22:02 Hrs"}
		else if (toValue == "Central Secretariat") {time = "23:00 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:17 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "22:38 Hrs"}				
	}
	else if (fromValue == "Sarita Vihar") 
	{
		if (toValue == "Dilshad Garden") {time = "22:17 Hrs"}
		else if (toValue == "Rithala") {time = "22:06 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "23:00 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "23:00 Hrs"}
		else if (toValue == "Noida City Center") {time = "22:17 Hrs"}
		else if (toValue == "Dwarka") {time = "22:38 Hrs"}
		else if (toValue == "Huda City Center") {time = "22:49 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "Wrong value entered!"}
		else if (toValue == "Mundka") {time = "22:06 Hrs"}
		else if (toValue == "Inderlok") {time = "22:06 Hrs"}
		else if (toValue == "Central Secretariat") {time = "23:00 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:17 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "22:38 Hrs"}				
	}
	else if (fromValue == "Mundka") 
	{
		if (toValue == "Dilshad Garden") {time = "22:44 Hrs"}
		else if (toValue == "Rithala") {time = "22:48 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "23:00 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "23:00 Hrs"}
		else if (toValue == "Noida City Center") {time = "22:00 Hrs"}
		else if (toValue == "Dwarka") {time = "22:17 Hrs"}
		else if (toValue == "Huda City Center") {time = "22:17 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "21:39 Hrs"}
		else if (toValue == "Mundka") {time = "Wrong value entered!"}
		else if (toValue == "Inderlok") {time = "23:00 Hrs"}
		else if (toValue == "Central Secretariat") {time = "22:17 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:00 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "22:17 Hrs"}				
	}
	else if (fromValue == "Kashmere Gate") 
	{
		if (toValue == "Dilshad Garden") {time = "23:29 Hrs"}
		else if (toValue == "Rithala") {time = "23:16 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "00:02 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "00:32 Hrs"}
		else if (toValue == "Noida City Center") {time = "23:02 Hrs"}
		else if (toValue == "Dwarka") {time = "23:40 Hrs"}
		else if (toValue == "Huda City Center") {time = "23:17 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "23:17 Hrs"}
		else if (toValue == "Mundka") {time = "23:16 Hrs"}
		else if (toValue == "Inderlok") {time = "23:16 Hrs"}
		else if (toValue == "Central Secretariat") {time = "23:17 Hrs"}
		else if (toValue == "Anand Vihar") {time = "22:47 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "23:18 Hrs"}				
	}	
	else if (fromValue == "Rajiv Chowk") 
	{
		if (toValue == "Dilshad Garden") {time = "23:07 Hrs"}
		else if (toValue == "Rithala") {time = "22:54 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "23:52 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "00:22 Hrs"}
		else if (toValue == "Noida City Center") {time = "23:23 Hrs"}
		else if (toValue == "Dwarka") {time = "23:40 Hrs"}
		else if (toValue == "Huda City Center") {time = "23:27 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "22:50 Hrs"}
		else if (toValue == "Mundka") {time = "22:54 Hrs"}
		else if (toValue == "Inderlok") {time = "22:54 Hrs"}
		else if (toValue == "Central Secretariat") {time = "23:27 Hrs"}
		else if (toValue == "Anand Vihar") {time = "23:15 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "23:38 Hrs"}				
	}	
	else if (fromValue == "Inderlok") 
	{
		if (toValue == "Dilshad Garden") {time = "23:18 Hrs"}
		else if (toValue == "Rithala") {time = "23:27 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "23:33 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "23:33 Hrs"}
		else if (toValue == "Noida City Center") {time = "22:39 Hrs"}
		else if (toValue == "Dwarka") {time = "22:51 Hrs"}
		else if (toValue == "Huda City Center") {time = "22:51 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "22:51 Hrs"}
		else if (toValue == "Mundka") {time = "23:30 Hrs"}
		else if (toValue == "Inderlok") {time = "Wrong value entered!"}
		else if (toValue == "Central Secretariat") {time = "--"}
		else if (toValue == "Anand Vihar") {time = "22:27 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "22:51 Hrs"}				
	}
	else if (fromValue == "Central Secretariat") 
	{
		if (toValue == "Dilshad Garden") {time = "23:05 Hrs"}
		else if (toValue == "Rithala") {time = "22:49 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "23:47 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "00:17 Hrs"}
		else if (toValue == "Noida City Center") {time = "23:05 Hrs"}
		else if (toValue == "Dwarka") {time = "22:51 Hrs"}
		else if (toValue == "Huda City Center") {time = "22:51 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "22:51 Hrs"}
		else if (toValue == "Mundka") {time = "22:49 Hrs"}
		else if (toValue == "Inderlok") {time = "22:49 Hrs"}
		else if (toValue == "Central Secretariat") {time = "Wrong value entered!"}
		else if (toValue == "Anand Vihar") {time = "23:02 Hrs"}
		else if (toValue == "Dwarka Sector 21") {time = "23:25 Hrs"}				
	}	
	else if (fromValue == "Anand Vihar") 
	{
		if (toValue == "Dilshad Garden") {time = "22:30 Hrs"}
		else if (toValue == "Rithala") {time = "22:15 Hrs"}
		else if (toValue == "Jahangirpuri") {time = "22:30 Hrs"}
		else if (toValue == "Vishwavidyalaya") {time = "22:40 Hrs"}
		else if (toValue == "Noida City Center") {time = "23:05 Hrs"}
		else if (toValue == "Dwarka") {time = "23:05 Hrs"}
		else if (toValue == "Huda City Center") {time = "22:40 Hrs"}
		else if (toValue == "Sarita Vihar") {time = "22:15 Hrs"}
		else if (toValue == "Mundka") {time = "22:15 Hrs"}
		else if (toValue == "Inderlok") {time = "22:15 Hrs"}
		else if (toValue == "Central Secretariat") {time = "22:40 Hrs"}
		else if (toValue == "Anand Vihar") {time = "Wrong value entered!"}
		else if (toValue == "Dwarka Sector 21") {time = "23:05 Hrs"}				
	}																																							
	document.getElementById('lasttime').innerHTML = time;
}